# here put the import lib
# @Time : 2020/9/12 15:16
# @Author : liruiyang
# @File : __init__
# @Software: PyCharm
from typing import Union, List, Dict, Any

from flask import Blueprint
from flask_restplus import Api, fields

main_api = Blueprint('main_api', __name__)

main_rest_api = Api(main_api, doc="/docs", version="v1.0", title="所有的Api", description="所有的Api都在这了")

back_model = main_rest_api.model('Api_back', {
    'code': fields.String("200", required=True),
    'msg': fields.String("成功！", required=True),
    'data': fields.Raw,
    'error': fields.String(),
})

from . import urls


def init_api(app):
    app.register_blueprint(main_api, url_prefix="/api")